home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / tskerm25.zip / PUTBIN.CMD < prev    next >
OS/2 REXX Batch file  |  1994-02-09  |  2KB  |  45 lines

  1. ;
  2. ; PUTBIN.CMD by Prof. Timo Salmi, ts@uwasa.fi, Wed 9-Feb-94
  3. ; A script to send a binary file to a Unix host from your PC
  4. ;
  5. ; To run putbin.cmd script give kermit command:
  6. ;     take putbin.cmd [filename]
  7. ; Or if you have run take zset.cmd then just give kermit command:
  8. ;     putbin [filename]
  9. ;
  10. ; Error handlers:
  11. def errstop1 echo \%1\7\13, define \%1, stop
  12. if not defined \%1 ask \%f Put which binary file?
  13. if defined \%1 define \%f \%1
  14. if not defined \%f errstop1 {Error: You have not defined the filename variable}
  15. ;
  16. def errstop2 echo \%1\7\13, define \%f, define \%1, stop
  17. if not exist \%f errstop2 {Error: File \%f not found}
  18. ;
  19. set take-echo on         ;Show what is happening
  20. clear                    ;Clear the input buffer
  21. set parity none          ;CHANGE as your system might require
  22. set send packet 1024     ;Use long packets
  23. set file type binary     ;This is a binary transfer
  24. set take-echo off        ;Enough of displaying the comments
  25. ;
  26. pause 1                            ;Let's not be too hasty about it :-)
  27. output kermit\13                   ;Invoke Unix C-kermit
  28. pause 1
  29. output set file type binary\13     ;E.g. if it is a .zip file
  30. pause 1
  31. output set parity none\13          ;CHANGE as your system might require
  32. pause 1
  33. output set receive packet 1024\13  ;Use long packets (C-Kermit)
  34. pause 1
  35. output receive\13                  ;Start receiving by host
  36. pause 1
  37. send \%f                           ;Start sending from your PC
  38. pause 5                            ;A longer pause is required here
  39. output quit\13                     ;Quit host kermit
  40. pause 1
  41. define \%f                         ;Release filename
  42. define \%1                         ;Release parameter
  43. pause 1
  44. echo \13Script PUTBIN.CMD by Prof. Timo Salmi, Done
  45.